package com.alibaba.citrus.cr.mn.order.center.autofulfillmentorder.service;

import com.alibaba.lattice2.epoch.sdk.model.Result;
import com.epoch.app.crforecastsales.domian.cfsbcautofulfillmentorderrecords.model.CfsBcAutoFulfillmentOrderRecords;
import com.epoch.app.mnordercenter.autofulfillmentorderbiz.dto.RetryAutoFulfillmentOrderRequest;
import com.epoch.app.mnordercenter.model.dto.ForecastBizAsyncResponse;
import com.epoch.app.mnordercenter.model.dto.ForecastOrderBizBatchCreateRequest;
import com.epoch.app.mnordercenter.model.dto.RetryAutoFulfillmentOrderResponse;

import java.util.List;

/**
 * @author baizhuo
 * @version 1.0
 * @date 2023/8/17 20:03
 */
public interface AutoFulfillmentOrderService {

    /**
     * 创建可自动履约的订单
     * @param forecastOrderBizBatchCreateRequest 订单批量创建请求
     * @return  Order Create Response
     */
    Result<ForecastBizAsyncResponse> createAutoFulfillmentOrders(ForecastOrderBizBatchCreateRequest forecastOrderBizBatchCreateRequest);


    /**
     * 重试可自动履约的订单
     * @param retryAutoFulfillmentOrderRequest 订单批量重试请求
     * @return Order Retry Response
     */
    Result<RetryAutoFulfillmentOrderResponse> retryAutoFulfillmentOrder(RetryAutoFulfillmentOrderRequest retryAutoFulfillmentOrderRequest);

    /**
     * 发送消息
     * @param batchNo
     * @param fromSys
     * @param businessType
     * @param businessUnitCode
     * @return
     */
    Result<Void> sendMessage(String batchNo, String fromSys, String businessType, String businessUnitCode);

    /**
     * 批量确认
     * @param cfsBcAutoFulfillmentOrderRecordsList
     */
    void filterOrderAndBatchConfirm(List<CfsBcAutoFulfillmentOrderRecords> cfsBcAutoFulfillmentOrderRecordsList);

}
